package com.memexue.order.message;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * 消息接收
 */
@Slf4j
@Component
// 绑定这个接口
@EnableBinding(StreamClient.class)
public class StreamReceiver {
    @StreamListener(StreamClient.INPUT)
    public void process(Object message){
        log.info("StreamReceiver:{}", message);
    }
}
